import java.util.Scanner;

public class HomeWork14_05{
    
    public static void main(String[] args){
        Scanner scan = new Scanner(System.in);
        
        System.out.print("请输入(尽量包含\'中国\'): "); 
        String str = scan.next();
        
        int count = StringParse.parseString(str, "中国");
        
        System.out.println("中国出现次数为： " + count);
    }
}

class StringParse{
    public static int parseString(String mainStr, String subStr){
        int count = 0;
        int start = 0;
        while((start = mainStr.indexOf(subStr, start)) != -1){
            ++count;
            start += subStr.length();
        }
        return count;
    }
}